package com.github.kuzan7.webdemo.controller;

import com.github.kuzan7.webdemo.vo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    @GetMapping("/hello")
    public Result index(@RequestParam(required = false, defaultValue = "小明") String name){
        return Result.ok(String.format("你好啊，%s", name));
    }

}
